package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.EditTextActivity;
import com.wwtech.epp.ui.activity.work.contract.EditTextContract;
import com.wwtech.epp.ui.activity.work.presenter.EditTextPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of EditTextActivity, provide field for EditTextActivity
 * @date 2017/12/06 16:56:22
 */
@Module
public class EditTextModule {
    private final EditTextContract.View mView;


    public EditTextModule(EditTextContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public EditTextPresenter provideEditTextPresenter(HttpAPIWrapper httpAPIWrapper, EditTextActivity mActivity) {
        return new EditTextPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public EditTextActivity provideEditTextActivity() {
        return (EditTextActivity) mView;
    }
}